package com.jeesite.modules.dataScreen.web.vo.ssmContact;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
@ApiModel("分类数据树形结构")
public class SsmContactTreeVo implements Serializable {

    private static final long serialVersionUID = -2036484456563256284L;

    @ApiModelProperty("分类code")
    private String code;

    @ApiModelProperty("分类名称")
    private String name;

    @ApiModelProperty("分类数据")
    private List<TypeItem> children = new ArrayList<>();

    @ApiModelProperty("用户数据")
    private List<UserItem> users = new ArrayList<>();


    @Data
    public static class TypeItem {
        @ApiModelProperty("地区分类名称")
        private String name;
        @ApiModelProperty("单位数据")
        private List<UnitItem> children = new ArrayList<>();

    }

    @Data
    public static class UnitItem {
        @ApiModelProperty("单位名称")
        private String name;

        @ApiModelProperty("单位数据")
        private List<DeptItem> children = new ArrayList<>();
    }

    @Data
    public static class DeptItem {
        @ApiModelProperty("部门名称")
        private String name;

        @ApiModelProperty("用户数据")
        private List<UserItem> users = new ArrayList<>();
    }

    @Data
    public static class UserItem {
        @ApiModelProperty("ID")
        private Integer id;
        @ApiModelProperty("名称")
        private String name;
        @ApiModelProperty("电话")
        private String tel;

        @ApiModelProperty("职务")
        private String jobName;
    }
}
